Closed
Conversation
This is a prototype for using the macOS Virtualization Framework to launch Linux VMs on macOS. See the README.md for details.
A bunch of new miscellaneous new features and improvements: - Rosetta is enabled on `aarch64-darwin`. This allows VMs to transparently run aarch64 and x86_64 Linux binaries simultaneously. - Install x86_64 binaries with Nix using the `--system` flag. For example, `nix profile install --system x86_64 <pkg>`. - The current Devbox project directory is now automatically detected and mounted. It can be found in `~/devbox` in the VM. - Devbox is automatically installed when the VM is created using the `github:jetpack-io/devbox?ref=gcurtis/flake` flake. - Starting a VM is now completely silent. The kernel's console is sent to `.devbox/vm/console` instead of stdout so that the first thing the user sees is their own shell prompt. - This work really well when launching a paused VM. If the VM resumes fast enough, it feels like using a normal shell. - Bootstrapping from an NixOS installer ISO with the `-install` flag is now fully automated. This is done by reading/writing to the VM's console using a pipe (similar to a program like `expect`). - Fixed a bug where stopping the VM would always return an error.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a prototype for using the macOS Virtualization Framework to launch Linux VMs on macOS.
The
dxvmcommand acts likedevbox shellexcept that it launches the Devboxenvironment in a VM.
To create a new VM, run the following:
After the VM is bootstrapped, you can launch it any time with:
See the README.md for details.
Changelog
10/16/23
aarch64-darwin. This allows VMs to transparently run aarch64 and x86_64 Linux binaries simultaneously.--systemflag. For example,nix profile install --system x86_64 <pkg>.~/devboxin the VM.github:jetpack-io/devbox?ref=gcurtis/flakeflake..devbox/vm/consoleinstead of stdout so that the first thing the user sees is their own shell prompt.-installflag is now fully automated. This is done by reading/writing to the VM's console using a pipe (similar to a program likeexpect).